package com.bawei.mall.product.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.product.domain.MallProductBrandInfo;
import com.bawei.mall.product.domain.MallProductDetail;
import com.bawei.mall.product.domain.MallProductHome;
import com.bawei.mall.product.service.MallProductdetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：HaoYunde
 * @Package：com.bawei.mall.product.controller
 * @Project：mall_cloud
 * @name：MallProductdetailController
 * @Date：2024/7/2 20:27
 */
@RestController
@RequestMapping("product")
public class MallProductdetailController {
    @Autowired
    private MallProductdetailService mallProductdetailService;



    @GetMapping("/detail")
    public R<MallProductDetail> detail(@RequestParam Long productId){
        MallProductDetail list=mallProductdetailService.detail(productId);
        return R.ok(list);
    }


    @GetMapping("/member/detail")
    public R<MallProductBrandInfo> detail2(@RequestParam  Long id){
        MallProductBrandInfo list=mallProductdetailService.detail2(id);
        return R.ok(list);
    }



}
